package com.tanhua.db.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.tanhua.api.BlackListApi;
import com.tanhua.db.mapper.BlackListMapper;
import com.tanhua.model.pojo.BlackList;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;
@DubboService
public class BlackListApiImpl implements BlackListApi {
    @Autowired
    private BlackListMapper blackListMapper;

    @Override
    public void delete(Long myUserId, Long userId) {

        blackListMapper.delete(Wrappers.<BlackList>lambdaUpdate().eq(BlackList::getBlackUserId,userId).eq(BlackList::getUserId,myUserId));
    }
}
